package byx.container.annotation.WrapTest;

import byx.container.annotation.annotation.Register;
import byx.container.annotation.annotation.Wrap;
import java.util.function.Function;

@Register
@Wrap({Wrapper1.class, Wrapper2.class})
public class B {
    public String f() {
        return "fff";
    }

    public String g() {
        return "ggg";
    }
}

class Wrapper1 implements Function<B, B> {
    @Override
    public B apply(B b) {
        return new B() {
            @Override
            public String f() {
                return b.f() + " 1";
            }

            @Override
            public String g() {
                return b.g();
            }
        };
    }
}

class Wrapper2 implements Function<B, B> {
    @Override
    public B apply(B b) {
        return new B() {
            @Override
            public String f() {
                return b.f();
            }

            @Override
            public String g() {
                return b.g() + " 2";
            }
        };
    }
}
